function findRepeatNumber_inSitu(nums: number[]): number {
    for (let i = 0; i < nums.length; i++) {
        let value = nums[i];
        while (value != i) {
            if (nums[value] == value) {
                return value;
            }
            nums[i] = nums[value];
            nums[value] = value;
            value = nums[i];
        }
    }
    return -1;
};